#include "cybertron/sensor/noise/NoiseMaker.hpp"

CYBERTRON_BEGIN

NoiseMaker::NoiseMaker()
	: mPos(0.0f), mRot(0.0f)
{
}

NoiseMaker::~NoiseMaker()
{
}

void NoiseMaker::update(const vec3& pos, const vec3& rotation, uint64_t frame/* = 0*/)
{
	mPos = pos;
	mRot = rotation;
	for (auto updateHandler : mpUpdateHandlers) {
		updateHandler();
	}
}

void NoiseMaker::addUpdateHandler(std::function<void()> updateHandler)
{
	mpUpdateHandlers.push_back(updateHandler);
}

CYBERTRON_END